// import Home from '../pages/Home'
const Home = () => import('../pages/Home')
// import Login from '../pages/Login'
const Login = () => import('../pages/Login')
// import Register from '../pages/Register'
const Register = () => import('../pages/Register')
import Search from '../pages/Search'
import Detail from '@/pages/Detail'
import AddCartSuccess from '@/pages/AddCartSuccess'
import ShopCart from '@/pages/ShopCart'




export default [
    
    {
        name: 'home',
        path: '/home',
        component: Home,
        meta: {
            isShowTypeNav: true
        }
    },
    {
        name: 'login',
        path: '/login',
        component: Login,
        meta: {
            isHiddenFooter: true
        }
    },
    {
        name: 'register',
        path: '/register',
        component: Register,
        meta: {
            isHiddenFooter: true
        }  // 这是一个用来存储额外数据的一个属性，可以通过这个属性做一些差异化的操作
    },
    {
        name: 'detail',
        path: '/detail/:id',
        component: Detail,
        props: true

    },
    {
        name: 'search', // 路由名称
        path: '/search/:keyword?',
        component: Search
    },
    {
        name: 'addcartsuccess',
        path: '/addCartSuccess',
        component: AddCartSuccess,
       
    },
    {
        name: 'shopcart',
        path: '/shopCart',
        component: ShopCart
    },

    {
        path: '/',
        redirect: '/home'
    },
    
]